<html>
<script language="JavaScript">
function right(e)
	{
		if (navigator.appName == 'Netscape' && 
		(e.which == 3 || e.which == 2))
			return false;
		else if (navigator.appName == 'Microsoft Internet Explorer' && 
		(event.button == 2 || event.button == 3))
		{
			alert("you are not allowed to do right click");
			return false;
		}
		return true;
	}
		
	function TBGlobalMouseUp() {
		document.onmouseup=right;
		if (document.layers) window.captureEvents(Event.MOUSEUP);
		window.onmouseup=right;
	}
	function TBGlobalMouseDown() {
		document.onmousedown=right;
		if (document.layers) window.captureEvents(Event.MOUSEDOWN);
		window.onmousedown=right;
	}
		TBGlobalMouseUp();
		TBGlobalMouseDown()
</script>		
<script language="JavaScript">
	function createhyperlink()
	{
		//var isA = window.opener.getEl("A",window.opener.DHTMLSafe.DOM.selection.createRange().commonParentElement());
		var str=document.Form1.url.value;
		var cap=document.Form1.caption.value;
		if(window.opener.Trim(cap)=="")
		{
		cap=str;
		}
		var theTarget_selectedIndex = document.Form1.target.selectedIndex;		
		var theTarget_value = document.Form1.target.options[theTarget_selectedIndex].value;
		if (theTarget_value=="")
		{
		var target="_self";
		}
		else
		{
		var target=theTarget_value;
		}
		if (window.opener.Trim(cap)=="")
		{
		document.Form1.caption.value=str;
		}
		if ((window.opener.Trim(str)=="") || (window.opener.Trim(str)=="http://") || (window.opener.Trim(str)=="https://") || (window.opener.Trim(str)=="ftp://") || (window.opener.Trim(str)=="mailto:"))
		{
			alert("please enter a valid URL");
			document.Form1.url.focus();
		}
		else
		{
			window.opener.createHyperlink(str,target,cap);
		}  
		window.close();
	}
</script>	
<head>
	<title>Insert Hyperlink</title>
	<style type="text/css">  
	TD {FONT-SIZE: 8pt; FONT-FAMILY: tahoma, verdana, Arial, Helvetica, sans-serif}
	.tbColor {cursor:hand;}
	</style>
	<script language="JavaScript1.1">
		function updateTheURL()
		{
			var theType_selectedIndex = document.Form1.type.selectedIndex;		
			var theType_value = document.Form1.type.options[theType_selectedIndex].value;
	    	document.Form1.url.value= theType_value;
		}
	</script>
</head>
<link rel="stylesheet" href="css/winie.css" type="text/css">
<body bgcolor=buttonface topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<form name="Form1">
<table width="90%" align="center" border="0">
<tr>
	<td>
<fieldset style="padding:3px;" title="Image Information"><legend style="height: 15px;">Hyperlink Information</legend>
<table width="100%" align="center" border="0">
			<tr>
				<td>
			<table align="center" border="0">
			<tr>
				<td width=70>Type:<br>
				<select name="type" size="1" onchange="updateTheURL()">
				<option value="http://">http:</option>
				<option value="https://">https:</option>
				<option value="ftp://">ftp:</option>
				<option value="mailto:">mailto:</option>
				</select>
				</td>
				<td valign="top">URL:<br>
				<input type="text" name="url" value="http://"></td>
			</tr>
			<tr>
				<td>Target:<br>
				<select name="target" size="1">
				<option value=""></option>
				<option value="_blank">blank</option>
				<option value="_parent">parent</option>
				<option value="_self">self</option>
				<option value="_top">top</option>
				</select>
				</td>
				<td>URL Caption:<br><input type="text" name="caption" size="25" value=""></td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
				<input type="button" name="Submit" value="     OK     " onclick="javascript:createhyperlink();">
				<input type="button" name="CANCEL" value="CANCEL" onClick="window.close();">
				</td>
			</tr>
			</table>
			</td>
			</tr>
			</table>
			</td>
			</tr>
			</table>
</form>
</body>
</html>
